import axios from '../../request'
export default {
    // 根据id删除题目
    del(data) {
        return axios.delete(`/question/qdetails/delete/${data}`);
    },
    //题目类型数据
    tseleLise() {
        return axios.get(`/question/type/list`);
    },
    //难度类型数据
    nseleLise() {
        return axios.get(`/question/nd/list`);
    },
    // 课程
    ke() {
        return axios.get(`/question/subject/list`)
    },
    //添加
    xiangqingDTO(data) {
        console.log(data);
        return axios.post(`/question/qdetails/add`, data);
    },
    //修改
    update(data) {
        return axios.put(`/question/qdetails/edit`, data);
    },
    // yemina
    yemian(pageSize) {
        return axios.get(`/question/qdetails/gett/?pageSize=${pageSize}`)
    },
    // 当前页
    danqina(page, pageSize) {
        return axios.get(`/question/qdetails/gett/?page=${page}&pageSize=${pageSize}`)
    },
    //根据id查询题目
    getIDti(id) {
        return axios.get(`question/qdetails/findbyID/${id}`)
    },
    //初始化页面数据
    getPageC() {
        return axios.get(`/question/qdetails/gett/?sid=&nid=&tid=&key=`)
    },
    //图片上传
    upload(data) {
        console.log(data);
        return axios.post(`/api/upload/upload`, data);
    },

    //查询id下拉框
    getNd(id) {
        return axios.get(`question/nd/getNd/${id}`);
    },
    //查询id下拉框
    getSid(id) {
        return axios.get(`/question/subject/findAll/${id}`);
    },
    //查询id下拉框
    getTid(id) {
        return axios.get(`/question/type/findAll/${id}`);
    },
}